<template>
	<view>
		<nav-bar title="店铺管理"></nav-bar>
		<view class="cell-box">
			<view class="cell-item" v-for="(item, index) in cellConfig" :key="index" @click="clickCellItem(item)">
				<view class="name">{{ item.userName }}</view>
				<view class="right-icon">
					<text>{{item.phoneNumber}}</text>
					<image class="arrow-img"
						:src="'https://rb.biomedical-wh.com/prod-api/profile/upload/fangxiStatis/icons/icon_right1.png'"
						mode="scaleToFill" />
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		baseIconUrl,
		baseImgUrl
	} from '@/config'
	export default {
		name: 'UserCenter',
		data() {
			return {
				cellConfig: [
				]
			}
		},
		methods: {
			clickCellItem(item) {
				console.log("账号详情");
			}
		},
		async onLoad(){
			const resid = await this.$GET('/fx/user/getInfo')
			const res = await this.$GET(`/fx/user/list?storeId=${resid.data.storeId}`)
		    this.cellConfig = res.rows
			console.log(res);
		}
	}
</script>

<style lang="scss" scoped>
	.cell-box {
		padding: 0 32rpx;
		border-radius: 12rpx;
		background-color: #FFF;
		min-height: 100vh;

		.cell-item {
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 122rpx;
			border-bottom: 2rpx solid #ddd;

			.name {
				flex: 1;
				font-size: 28rpx;
				font-weight: 500;
				margin-left: 40rpx;
			}

			.right-icon {
				height: 42rpx;
				line-height: 42rpx;
				display: flex;
				align-content: center;

				.arrow-img {
					width: 42rpx;
					height: 42rpx;
				}
			}
		}
	}
</style>